package com.nbicc.newpic.service;

import com.nbicc.file.bo.FileDesc;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface INewPicService {

    /**
     * 下载新闻图片
     * @param request
     * @param response
     * @param id
     * @throws IOException
     */
    void downloadFile(HttpServletRequest request, HttpServletResponse response, long id) throws IOException;

    /**
     * 上传新闻图片
     * @param request
     * @param uploadFile
     * @return
     * @throws IOException
     */
    FileDesc uploadFile(HttpServletRequest request, MultipartFile uploadFile) throws IOException;

    /**
     * 删除新闻图片
     * @param id
     * @throws IOException
     */
    void deleteFile(Number id) throws IOException;

}
